#include "../../Header/Core/Device.h"

Device* Device::m_Instance = 0;

Device::Device()
{

}

Device::~Device()
{

}

void Device::SleepEx(__float_ ms)
{
#if CURRENT_PLATFORM == WIN
	Sleep((DWORD)ms);
#else
	//
#endif
}

void Device::LogEx(const char *formatStr, ...)
{
#if CURRENT_PLATFORM == WIN
	va_list params;

	char buf[2048];
	wchar_t lbuf[2048];

	va_start(params, formatStr);
	vsprintf_s(buf, sizeof(buf), formatStr, params);

	printf("%s", buf);

	MultiByteToWideChar(CP_ACP, 0, buf, -1, lbuf, 2048);
	OutputDebugString(lbuf);

	va_end(params);
#else
	//
#endif
}